package com.giscloud.amp.entity.vo;

import cn.hutool.core.date.DateUtil;
import com.giscloud.amp.entity.AmpStaffOrg;

/**
 * @Author:gxd
 * @Description:
 * @Date: 10:43 2018/2/24
 * @Modified By:
 */
public class AmpStaffOrgVO extends AmpStaffOrg {
    private String createdDtDesc;
    private String statusCdDesc;

    public String getCreatedDtDesc() {
        if(super.getCreatedDt() != null){
            return DateUtil.format(super.getCreatedDt(),"yyyy-MM-dd");
        }
        return "";
    }

    public void setCreatedDtDesc(String createdDtDesc) {
        this.createdDtDesc = createdDtDesc;
    }

    public String getStatusCdDesc() {
        //用户状态 1|在用;2|删除;3|离职;4|冻结
        if (getStatusCd().equals(1L)) {
            return "启用";
        } else if (getStatusCd().equals(2L)) {
            return "未启用";
        } else {
            return "未设置";
        }
    }

    public void setStatusCdDesc(String statusCdDesc) {
        this.statusCdDesc = statusCdDesc;
    }
}
